import java.util.Scanner;

public class OJ1000 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        long a=sc.nextLong();
        long b=sc.nextLong();
        long a1=sc.nextLong();
        long b1=sc.nextLong();
        System.out.println(a+b);
        System.out.println(a1+b1);
    }
}
